package classPractice;

public class Person {
    private String name; //私有化成员变量 ，当前类内部调用
    int age;
    String sex;
    void add (int age,int a){
        this.age = age*a;
    }
    void showArgument(int a,String... args){
        if(args.length>0){
            System.out.println(args.toString()); //不是数组，不可以使用arrays中的工具方法
            System.out.println(a);
        }

    }
    int getAge (){
        return this.age;
    }

    public String getName() {
        return this.name;
    }
    public void setName(String name){
        this.name = name;
    }
    public static void main(String[] arg){
        Person obj = new Person();
        int c = 0;
        System.out.println(c);
        obj.name = "yankun";
        obj.age = 12;
        System.out.println(obj.name+obj.age);
        obj.add(1,20);
        System.out.println(obj.age);
        obj.showArgument(1,"1231","123123","adfgdgr");
        System.out.println(obj.getAge());
    }
}
